package com.qs.constant;

/**
 * ClassName: RedisConstant
 * Package: com.qs.constant
 * Description:
 *
 * @Author: @weixueshi
 * @Create: 2023/11/20 - 13:15
 * @Version: v1.0
 */

/**
 * 存放redis的键
 */
public class RedisConstant {
    /**
     * 省市区缓存键
     */
    public static final String AREA = "area";

    /**
     * 验证码缓存键
     */
    public static final String MESSAGE_CODE = "code:";
    /**
     * 商品缓存过期时间
     */
    public static final Integer CACHE_EXPIRE = 30;
    /**
     * 热卖商品缓存过期时间
     */
    public static final Integer GOODS_HOT_CACHE_EXPIRE = 4;
    /**
     * 热卖商品缓存过期时间
     */
    public static final Integer GOODS_RECOMMEND_CACHE_EXPIRE = 5;
    /**
     * 商品缓存过期时间
     */
    public static final Integer ORDER_CACHE_EXPIRE = 15;
    /**
     * 商品缓存空对象过期时间
     */
    public static final Integer CACHE_NULL_EXPIRE = 2;
    /**
     * 设置获取锁时间
     */
    public static final Integer CACHE_LOCK_EXPIRE = 10;
    /**
     * 设置锁的键
     */
    public static final String GOODS_LOCK = "goods:lock:";
    /**
     * 线程休眠时间
     */
    public static final Integer THREAD_SLEEP = 50;
    /**
     * 商品品牌键
     */
    public static final String GOODS_BRAND = "goods:brand";
    /**
     * 商品品牌键
     */
    public static final String GOODS_BRAND_LOCK = "goods:brand:lock";
    /**
     * 用户店铺键
     */
    public static final String USER_STORE = "user:store:";
    /**
     * 用户店铺键
     */
    public static final String USER_STORE_LOCK = "user:store:lock";
    /**
     * 商品分类键
     */
    public static final String GOODS_CATEGORY = "goods:category";
    /**
     * 热卖商品
     */
    public static final String GOODS_HOT = "goods:hot";
    /**
     * 推荐商品
     */
    public static final String GOODS_RECOMMEND = "goods:recommend";
    /**
     * 商品分类锁
     */
    public static final String GOODS_CATEGORY_LOCK = "goods:category:lock";
    /**
     * 订单号键
     */
    public static final String ORDER_ID = "order:id:";
    /**
     * 商品锁定数据键
     */
    public static final String GOODS_STOCK_LOCK = "stock:lock:info:";
    /**
     * 商品锁定数据键
     */
    public static final String STOCK_LOCK = "stock:lock:";
    /**
     * 首页商品轮播图
     */
    public static final String INDEX_GOODS_IMAGE = "index:goods:image";

    /**
     * 首页系统公告
     */
    public static final String INDEX_NOTICE = "index:notice";
}
